// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-vo.ts.hbs生成
import { ControlVOBase } from '@/core';
import { transformValue } from '@/utils';
import { model } from './usr-0309943026-form-model';

export class FormControlVO extends ControlVOBase {
	constructor(data: any) {
		//  表单预置字段
		data.srfwfmemo = data['srfwfmemo'] ? data['srfwfmemo'] : '';
		data.srffrontuf = data['srffrontuf'] ? data['srffrontuf'] : '';
		super(data);
		//  表单自持属性
		this.$ownKeys = [
			'member_of',
			'srfupdatedate',
			'srforikey',
			'srfkey',
			'srfmajortext',
			'srftempmode',
			'srfuf',
			'srfdeid',
			'srfsourcekey',
			'display_name',
			'uid',
			'identification_number',
			'title',
			'mobile',
			'telephone_number',
			'mail',
			'postal_address',
			'employee_type',
			'employee_number',
			'description',
			'organization_id',
			'id',
		];
	}
	get srfupdatedate() {
		return this.$DO.update_time;
	}
	set srfupdatedate(value: any) {
		this.$DO.update_time = value;
	}
	get srfkey() {
		return this.$DO.id;
	}
	set srfkey(value: any) {
		this.$DO.id = value;
	}
	get srfmajortext() {
		return this.$DO.display_name;
	}
	set srfmajortext(value: any) {
		this.$DO.display_name = value;
	}
	get display_name() {
		return this.$DO.display_name;
	}
	set display_name(value: any) {
		this.$DO.display_name = value;
	}
	get uid() {
		return this.$DO.uid;
	}
	set uid(value: any) {
		this.$DO.uid = value;
	}
	get identification_number() {
		return this.$DO.identification_number;
	}
	set identification_number(value: any) {
		this.$DO.identification_number = value;
	}
	get title() {
		return this.$DO.title;
	}
	set title(value: any) {
		this.$DO.title = value;
	}
	get mobile() {
		return this.$DO.mobile;
	}
	set mobile(value: any) {
		this.$DO.mobile = value;
	}
	get telephone_number() {
		return this.$DO.telephone_number;
	}
	set telephone_number(value: any) {
		this.$DO.telephone_number = value;
	}
	get mail() {
		return this.$DO.mail;
	}
	set mail(value: any) {
		this.$DO.mail = value;
	}
	get postal_address() {
		return this.$DO.postal_address;
	}
	set postal_address(value: any) {
		this.$DO.postal_address = value;
	}
	get employee_type() {
		return this.$DO.employee_type;
	}
	set employee_type(value: any) {
		this.$DO.employee_type = value;
	}
	get employee_number() {
		return this.$DO.employee_number;
	}
	set employee_number(value: any) {
		this.$DO.employee_number = value;
	}
	get description() {
		return this.$DO.description;
	}
	set description(value: any) {
		this.$DO.description = value;
	}
	get organization_id() {
		return this.$DO.organization_id;
	}
	set organization_id(value: any) {
		this.$DO.organization_id = value;
	}
	get id() {
		return this.$DO.id;
	}
	set id(value: any) {
		this.$DO.id = value;
	}
	// 界面主键标识
	get sys_person() {
		return this.$DO.id;
	}

	set sys_person(value: any) {
		this.$DO.id = value;
	}

	//  工作流预置字段
	srfwfmemo: any;
	srffrontuf: any;

	//  无实体属性表单项
	get srftempmode() {
		return this.$DO.srftempmode;
	}

	set srftempmode(value: any) {
		this.$DO.srftempmode = value;
	}

	//  表单重复器
	get member_of() {
		return transformValue('member_of', model, true, this.$DO.member_of);
	}

	set member_of(value: any) {
		this.$DO.member_of = transformValue('member_of', model, false, value);
	}

	/**
	 * 返回后台数据
	 *
	 * @return {*}
	 * @memberof FormControlVO
	 */
	public getDo() {
		return {
			srffrontuf: this.srffrontuf,
			display_name: this.$DO.display_name,
			uid: this.$DO.uid,
			identification_number: this.$DO.identification_number,
			title: this.$DO.title,
			mobile: this.$DO.mobile,
			telephone_number: this.$DO.telephone_number,
			mail: this.$DO.mail,
			postal_address: this.$DO.postal_address,
			employee_type: this.$DO.employee_type,
			employee_number: this.$DO.employee_number,
			description: this.$DO.description,
			organization_id: this.$DO.organization_id,
			member_of: this.$DO.member_of,
			update_time: this.$DO.update_time,
			id: this.$DO.id,
		};
	}
}
